<?php
namespace app\not_found\controller;
use think\Controller;

class Index extends Controller
{
    public function index()
    {
        $this->assign([
            'error_code'=> $this->get_this_config_value(2,'error_code'),
            'error_title'=> $this->get_this_config_value(2,'error_title'),
            'error_msg'=> $this->get_this_config_value(2,'error_msg'),
        ]);
        return $this->fetch();
    }

    public function get_type_value($_type)
    {
        return Model('Config')->get_type_config($_type);
    }

    public function get_this_config_value($_type,$_name)
    {
        $_error_msg = Model('Config')->get_this_config_value($_type,$_name);
        return $_error_msg['value'];
    }
}